package cloudspace.util.jassistwrappers;

import java.io.File;

import cloudspace.vm.VM;


/**
 * The Class VMClassContext. This is an abstract class to allow all javassist
 * wrappers access to the current directory. This is a convenience method.
 */
public abstract class VMClassContext
{

    /**
     * Gets the current local directory through thread tag inspection. The
     * thread performing javassist translations MUST be tagged to a current
     * context. If not a Null pointer exception will be thrown.
     * 
     * @return the current local directory
     */
    protected static String getCurrentPrefix()
    {
        return VM.currentVM().getLocalRoot() + File.separatorChar;
    }
}
